/*
 * Copyright (c) 2020, China Mobile Communications Group Co.,Ltd.
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2020-11-16     cmcc       the first version
 */
#ifndef NINESKY_UTIL_FILEUTIL_H_
#define NINESKY_UTIL_FILEUTIL_H_

#include <os_stddef.h>
#include <string.h>

//SD Card FS
#include <vfs_fs.h>
#include <vfs_posix.h>

int init_sd_card(char *sd_card_name, char *mount_path, char *fs_format);

char *get_file_name(char *filePath);

long get_file_size(char *filePath);

long read_file(char *filePath, void *buffer, long length);

char *read_file_all(char *filePath, long *length);

long write_file(char *filePath, int flag, int mode, void *buffer, long length);

#endif /* NINESKY_UTIL_FILEUTIL_H_ */
